using System;
using NHibernate;
using Yama.MVC.Dao;

namespace Yama.MVC.NHibernate
{
    public class NhDaoException : DaoException
    {
        public ISession Session { get; set; }
        public Type PersistentType { get; set; }

        public NhDaoException(string msg, ISession session, Type persistentType)
            : base(msg)
        {
            Session = session;
            PersistentType = persistentType;
        }

        public NhDaoException(string msg, Exception inner, ISession session, Type persistentType)
            : base(msg, inner)
        {
            Session = session;
            PersistentType = persistentType;
        }
    }
}